﻿<presentation:UserControlView x:Class="Chronos.Client.Win.Views.Configurations.RecentConfigurations.View"
                              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                              xmlns:presentation="clr-namespace:Rhiannon.Windows.Presentation;assembly=Rhiannon.Windows"
                              xmlns:commanding="clr-namespace:Rhiannon.Windows.Presentation.Commands;assembly=Rhiannon.Windows"
							  xmlns:controls="clr-namespace:Rhiannon.Windows.Controls;assembly=Rhiannon.Windows"
                              x:Uid="Profiler_Configurations_RecentConfigurationsView">
	<Grid>
		<ItemsControl Grid.Row="1" ItemsSource="{Binding Configurations}">
			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<Grid Margin="5">
						<controls:TileButton Background="#D732FC" Foreground="#FFFFFF" Text="{Binding Name}" />
                        <controls:ImageButton Height="24" Width="24" ImageSource="pack://application:,,,/Chronos.Client.Win;component/Resources/images/close.png" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Cursor="Hand"
											  commanding:Event.Command="{Binding DataContext.DeleteConfigurationCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
											  commanding:Event.CommandParameter="{Binding}" />
					</Grid>
				</DataTemplate>
			</ItemsControl.ItemTemplate>
			<ItemsControl.ItemsPanel>
				<ItemsPanelTemplate>
					<WrapPanel />
				</ItemsPanelTemplate>
			</ItemsControl.ItemsPanel>
		</ItemsControl>
	</Grid>
</presentation:UserControlView>